﻿/*
 作者:zs
日期：2022.3.17
功能：KCP数据处理器
*/

using System;
using System.Buffers;
using System.Net.Sockets.Kcp;

namespace PENet
{
    public class KCPHandler : IKcpCallback
    {
        public Action<Memory<byte>> Out;

        public void Output(IMemoryOwner<byte> buffer, int avalidLength)
        {
            using (buffer)
            {
                Out(buffer.Memory.Slice(0, avalidLength));
            }
        }


    }
}
